package com.thz.friend.pojo.reply;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.thz.common.core.pojo.BaseEntity;
import lombok.*;

/**
 * @Description
 * @Author thz
 * @Date 2025/5/11
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName("tb_reply")
public class Reply extends BaseEntity {
    @TableId(type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    @JsonSerialize(using = ToStringSerializer.class)
    private Long parentId;    // 父评论ID，一级评论为null
    @JsonSerialize(using = ToStringSerializer.class)
    private Long postUserId;  // 评论用户ID
    @JsonSerialize(using = ToStringSerializer.class)
    private Long replyUserId; // 被回复用户ID
    private String content;
    @JsonSerialize(using = ToStringSerializer.class)
    private Long courseId;    // 关联课程
    private Integer likeCount;
}